﻿<?php
    require_once('mysqli_con.php');

    // $select1 = "select * from develop order by id";
    function display($con, $job){
        $query1 = mysqli_query($con, $job);
        if($query1 && mysqli_num_rows($query1)){
          while ($str = mysqli_fetch_assoc($query1)) {
            $data[] = $str;
          }
        } else{
            $data = array();
        }
        return $data;
    }
?>

<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>红满堂报名后台</title>

    <link type="text/css" rel="stylesheet" href="css/carousel.css">
    <script type="text/javascript" src="js/jquery.js"></script>
    <script type="text/javascript" src="js/carousel.js"></script>
    <!-- Bootstrap -->
    <link rel="stylesheet" href="css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="css/screen.css">

  </head>
  <body>
      <div class="header">
        <div class="container">       
          <div class="head">
              <div class="logo">
                  <h2 class="text-center text">亲爱的红薯er，欢迎参加红满堂工作室本学期招新</h2><br/><br/>
                  <h3 class="text-center text">
                      红满堂工作室是一个立志于为华农师生服务的校一级学生组织
                  </h3>
              </div>
          </div>
        
        </div>        
      </div>

    <div class="container">

  <!-- Nav tabs -->
  <ul class="nav nav-tabs nav-move" role="tablist">
    <li role="presentation" class="active"><a href="#all" aria-controls="all" role="tab" data-toggle="tab">所有报名者信息</a></li>
    <li role="presentation"><a href="#develop" aria-controls="develop" role="tab" data-toggle="tab">开发类</a></li>
    <li role="presentation"><a href="#design" aria-controls="design" role="tab" data-toggle="tab">设计类</a></li>
    <li role="presentation"><a href="#moderator" aria-controls="moderator" role="tab" data-toggle="tab">版主</a></li>
    <li role="presentation"><a href="#operate" aria-controls="operate" role="tab" data-toggle="tab">运营</a></li>
  </ul>

  <!-- Tab panes -->
  <div class="tab-content">
   <!-- 查看所有报名者信息 -->
    <div role="tabpanel" class="tab-pane active" id="all">       
      <?php
          $all = "select * from develop order by id";
          $data = display($con, $all);
          if(empty($data)){
            echo "当前还没有人报名";
          }else{
            foreach ($data as $value) {
      ?>

       <div class="container">
          <div class="row">
            <div class="col-md-8">
              <div class="article">
                <div class="tittle">
                  <p><?php 
                        echo "报名时间：".$value['dateline']."<br><br>";
                        echo "&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp姓名：".$value['name']."&nbsp&nbsp&nbsp&nbsp";
                        echo "学院年级专业：".$value['grade']."&nbsp&nbsp&nbsp&nbsp";
                        echo "应聘职位：".$value['job']."<br><br>";
                        echo "&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp电话：".$value['phone']."&nbsp&nbsp&nbsp&nbsp";
                        echo "邮箱：".$value['email']."&nbsp&nbsp&nbsp&nbsp";
                     ?>
                  </p>
                </div>
                <div class="content">
                    <p><?php echo $value['content'];?></p>
                </div>
              </div>
            </div>
          </div>
      </div>

      <?php
            }
          }
      ?>  
    </div>

    <!--  开发类 -->
    <div role="tabpanel" class="tab-pane" id="develop">
      <?php
          $develop = "select * from develop where job like '开发类%' order by id";
          $data = display($con, $develop);
          if(empty($data)){
            echo "当前还没有人报名";
          }else{
            foreach ($data as $value) {
      ?>

      <div class="container">
          <div class="row">
            <div class="col-md-8">
              <div class="article">
                <div class="tittle">
                  <p><?php 
                        echo "报名时间：".$value['dateline']."<br><br>";
                        echo "&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp姓名：".$value['name']."&nbsp&nbsp&nbsp&nbsp";
                        echo "学院年级专业：".$value['grade']."&nbsp&nbsp&nbsp&nbsp";
                        echo "应聘职位：".$value['job']."<br><br>";
                        echo "&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp电话：".$value['phone']."&nbsp&nbsp&nbsp&nbsp";
                        echo "邮箱：".$value['email']."&nbsp&nbsp&nbsp&nbsp";
                     ?>
                  </p>
                </div>
                <div class="content">
                    <p><?php echo $value['content'];?></p>
                </div>
              </div>
            </div>
          </div>
      </div>
              
              
              
      <?php
            }
          } 
      ?>
    </div>

    <!-- 设计类 -->
    <div role="tabpanel" class="tab-pane" id="design">
       <?php
          $develop = "select * from develop where job like '设计类%' order by id";
          $data = display($con, $develop);
          if(empty($data)){
            echo "当前还没有人报名";
          }else{
            foreach ($data as $value) {
      ?>

      <div class="container">
          <div class="row">
            <div class="col-md-8">
              <div class="article">
                <div class="tittle">
                  <p><?php 
                        echo "报名时间：".$value['dateline']."<br><br>";
                        echo "&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp姓名：".$value['name']."&nbsp&nbsp&nbsp&nbsp";
                        echo "学院年级专业：".$value['grade']."&nbsp&nbsp&nbsp&nbsp";
                        echo "应聘职位：".$value['job']."<br><br>";
                        echo "&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp电话：".$value['phone']."&nbsp&nbsp&nbsp&nbsp";
                        echo "邮箱：".$value['email']."&nbsp&nbsp&nbsp&nbsp";
                     ?>
                  </p>
                </div>
                <div class="content">
                    <p><?php echo $value['content'];?></p>
                </div>
              </div>
            </div>
          </div>
      </div>
              
              
              
      <?php
            }
          } 
      ?>
    </div>

    <!-- 版主 -->
    <div role="tabpanel" class="tab-pane" id="moderator">
      <?php
          $develop = "select * from develop where job like '版主%' order by id";
          $data = display($con, $develop);
          if(empty($data)){
            echo "当前还没有人报名";
          }else{
            foreach ($data as $value) {
      ?>

      <div class="container">
          <div class="row">
            <div class="col-md-8">
              <div class="article">
                <div class="tittle">
                  <p><?php 
                        echo "报名时间：".$value['dateline']."<br><br>";
                        echo "&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp姓名：".$value['name']."&nbsp&nbsp&nbsp&nbsp";
                        echo "学院年级专业：".$value['grade']."&nbsp&nbsp&nbsp&nbsp";
                        echo "应聘职位：".$value['job']."<br><br>";
                        echo "&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp电话：".$value['phone']."&nbsp&nbsp&nbsp&nbsp";
                        echo "邮箱：".$value['email']."&nbsp&nbsp&nbsp&nbsp";
                     ?>
                  </p>
                </div>
                <div class="content">
                    <p><?php echo $value['content'];?></p>
                </div>
              </div>
            </div>
          </div>
      </div>
              
              
              
      <?php
            }
          } 
      ?>

    </div>

    <!-- 运营 -->
    <div role="tabpanel" class="tab-pane" id="operate">
          <?php
          $develop = "select * from develop where job like '运营%' order by id";
          $data = display($con, $develop);
          if(empty($data)){
            echo "当前还没有人报名";
          }else{
            foreach ($data as $value) {
      ?>

      <div class="container">
          <div class="row">
            <div class="col-md-8">
              <div class="article">
                <div class="tittle">
                  <p><?php 
                       echo "报名时间：".$value['dateline']."<br><br>";
                        echo "&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp姓名：".$value['name']."&nbsp&nbsp&nbsp&nbsp";
                        echo "学院年级专业：".$value['grade']."&nbsp&nbsp&nbsp&nbsp";
                        echo "应聘职位：".$value['job']."<br><br>";
                        echo "&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp电话：".$value['phone']."&nbsp&nbsp&nbsp&nbsp";
                        echo "邮箱：".$value['email']."&nbsp&nbsp&nbsp&nbsp";
                     ?>
                  </p>
                </div>
                <div class="content">
                    <p><?php echo $value['content'];?></p>
                </div>
              </div>
            </div>
          </div>
      </div>
              
              
              
      <?php
            }
          } 
      ?>

    </div>
  </div>

</div>
      

      <div class="footer">
        <p class="text-center">Design by：少年</p>
      </div>
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="js/jquery-1.11.2.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="js/bootstrap.min.js"></script>
  </body>
</html>